package com.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * TClass entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_class", schema = "")
public class TClass implements java.io.Serializable {

	// Fields

	private String classId;
	private TMajor TMajor;
	private TGrade TGrade;
	private String id;
	private String className;
	private String isEnable;

	// Constructors

	/** default constructor */
	public TClass() {
	}

	/** minimal constructor */
	public TClass(String classId) {
		this.classId = classId;
	}

	/** full constructor */
	public TClass(String classId, TMajor TMajor, TGrade TGrade, String id, String className, String isEnable) {
		this.classId = classId;
		this.TMajor = TMajor;
		this.TGrade = TGrade;
		this.id = id;
		this.className = className;
		this.isEnable = isEnable;
	}

	// Property accessors
	@Column(name = "classID", unique = true, nullable = false)
	public String getClassId() {
		return this.classId;
	}

	public void setClassId(String classId) {
		this.classId = classId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "majorID")
	public TMajor getTMajor() {
		return this.TMajor;
	}

	public void setTMajor(TMajor TMajor) {
		this.TMajor = TMajor;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "gradeID")
	public TGrade getTGrade() {
		return this.TGrade;
	}

	public void setTGrade(TGrade TGrade) {
		this.TGrade = TGrade;
	}
	@Id
	@Column(name = "id")
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "className")
	public String getClassName() {
		return this.className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	@Column(name = "isEnable")
	public String getIsEnable() {
		return this.isEnable;
	}

	public void setIsEnable(String isEnable) {
		this.isEnable = isEnable;
	}

}